from flask import Flask
from flask import render_template
from .views.errors import blue_errors
from .views.index import blue_index
from .views.login import blue_login
from flask import session

app = Flask(__name__, template_folder='templates', static_folder='static')

app.register_blueprint(blue_errors)
app.register_blueprint(blue_index)
app.register_blueprint(blue_login)

app.secret_key = '1'


@app.errorhandler(404)
def page_not_found(error):
    return render_template('errors.html')
